package com.baosight.sczx.zm.ci.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.StringUtils;

public class ZMCIGasInfoNew extends DaoEPBase {

	private String fdKeyId = " ";		/* 主键*/
	private String fdMineCode = " ";		/*矿井编码*/
	private String fdMineName = " ";		/*矿井名称*/
	private String fdPointId = " ";		/*报警地点ID*/
	private String fdAddress = " ";		/*报警地点*/
	private String fdAlarmStatus = " ";		/*报警状态*/
	private String fdTypeId = " ";		/*报警类型ID*/
	private String fdTypeName = " ";		/*报警类型*/
	private String fdBeginTime = " ";		/*报警开始时间*/
	private String fdEndTime = " ";		/*报警结束时间*/
	private String fdMaxValue = " ";		/*最大值*/
	private String fdMaxTime = " ";		/*最大值发生时间*/
	private String fdMinValue = " ";		/*最小值*/
	private String fdMinTime = " ";		/*最小值发生时间*/
	private String fdAvgValue = " ";		/*平均值*/
	private String fdTimestamp = " ";    /*时间戳*/
	
	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);	
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdMineCode");
		eiColumn.setFieldLength(50);	
		eiColumn.setDescName("矿井编码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMineName");
		eiColumn.setFieldLength(50);	
		eiColumn.setDescName("矿井名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdPointId");
		eiColumn.setFieldLength(32);	
		eiColumn.setDescName("报警地点ID");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdAddress");
		eiColumn.setFieldLength(200);	
		eiColumn.setDescName("报警地点");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAlarmStatus");
		eiColumn.setFieldLength(20);	
		eiColumn.setDescName("报警状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTypeId");
		eiColumn.setFieldLength(6);	
		eiColumn.setDescName("报警类型ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTypeName");
		eiColumn.setFieldLength(50);	
		eiColumn.setDescName("报警类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeginTime");
		eiColumn.setFieldLength(30);	
		eiColumn.setDescName("报警开始时间");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdEndTime");
		eiColumn.setFieldLength(30);	
		eiColumn.setDescName("报警结束时间");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaxValue");
		eiColumn.setFieldLength(20);	
		eiColumn.setDescName("最大值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaxTime");
		eiColumn.setFieldLength(30);	
		eiColumn.setDescName("最大值发生时间");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdMinValue");
		eiColumn.setFieldLength(20);	
		eiColumn.setDescName("最小值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMinTime");
		eiColumn.setFieldLength(30);	
		eiColumn.setDescName("最小值发生时间");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAvgValue");
		eiColumn.setFieldLength(20);	
		eiColumn.setDescName("平均值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTimestamp");
		eiColumn.setFieldLength(30);	
		eiColumn.setDescName("新建时间");
		eiMetadata.addMeta(eiColumn);
	}
	
	/**
	 * the constructor
	 */
	public ZMCIGasInfoNew() {
		initMetaData();
	}

	public String getFdKeyId() {
		return fdKeyId;
	}

	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	public String getFdMineCode() {
		return fdMineCode;
	}

	public void setFdMineCode(String fdMineCode) {
		this.fdMineCode = fdMineCode;
	}

	public String getFdMineName() {
		return fdMineName;
	}

	public void setFdMineName(String fdMineName) {
		this.fdMineName = fdMineName;
	}

	public String getFdPointId() {
		return fdPointId;
	}

	public void setFdPointId(String fdPointId) {
		this.fdPointId = fdPointId;
	}

	public String getFdAddress() {
		return fdAddress;
	}

	public void setFdAddress(String fdAddress) {
		this.fdAddress = fdAddress;
	}

	public String getFdAlarmStatus() {
		return fdAlarmStatus;
	}

	public void setFdAlarmStatus(String fdAlarmStatus) {
		this.fdAlarmStatus = fdAlarmStatus;
	}

	public String getFdTypeId() {
		return fdTypeId;
	}

	public void setFdTypeId(String fdTypeId) {
		this.fdTypeId = fdTypeId;
	}

	public String getFdTypeName() {
		return fdTypeName;
	}

	public void setFdTypeName(String fdTypeName) {
		this.fdTypeName = fdTypeName;
	}

	public String getFdBeginTime() {
		return fdBeginTime;
	}

	public void setFdBeginTime(String fdBeginTime) {
		this.fdBeginTime = fdBeginTime;
	}

	public String getFdEndTime() {
		return fdEndTime;
	}

	public void setFdEndTime(String fdEndTime) {
		this.fdEndTime = fdEndTime;
	}

	public String getFdMaxValue() {
		return fdMaxValue;
	}

	public void setFdMaxValue(String fdMaxValue) {
		this.fdMaxValue = fdMaxValue;
	}

	public String getFdMaxTime() {
		return fdMaxTime;
	}

	public void setFdMaxTime(String fdMaxTime) {
		this.fdMaxTime = fdMaxTime;
	}

	public String getFdMinValue() {
		return fdMinValue;
	}

	public void setFdMinValue(String fdMinValue) {
		this.fdMinValue = fdMinValue;
	}

	public String getFdMinTime() {
		return fdMinTime;
	}

	public void setFdMinTime(String fdMinTime) {
		this.fdMinTime = fdMinTime;
	}

	public String getFdAvgValue() {
		return fdAvgValue;
	}

	public void setFdAvgValue(String fdAvgValue) {
		this.fdAvgValue = fdAvgValue;
	}

	public String getFdTimestamp() {
		return fdTimestamp;
	}

	public void setFdTimestamp(String fdTimestamp) {
		this.fdTimestamp = fdTimestamp;
	}

	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdMineCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMineCode")), fdMineCode));
		setFdMineName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMineName")), fdMineName));
		setFdPointId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPointId")), fdPointId));
		setFdAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAddress")), fdAddress));
		setFdAlarmStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAlarmStatus")), fdAlarmStatus));
		setFdTypeId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeId")), fdTypeId));
		setFdTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeName")), fdTypeName));
		setFdBeginTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBeginTime")), fdBeginTime));
		setFdEndTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEndTime")), fdEndTime));
		setFdMaxValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaxValue")), fdMaxValue));
		setFdMaxTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaxTime")), fdMaxTime));
		setFdMinValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMinValue")), fdMinValue));
		setFdMinTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMinTime")), fdMinTime));
		setFdAvgValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAvgValue")), fdAvgValue));
		setFdTimestamp(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTimestamp")), fdTimestamp));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
		
		map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
		map.put("fdMineCode",StringUtils.toString(fdMineCode, eiMetadata.getMeta("fdMineCode")));	
		map.put("fdMineName",StringUtils.toString(fdMineName, eiMetadata.getMeta("fdMineName")));	
		map.put("fdPointId",StringUtils.toString(fdPointId, eiMetadata.getMeta("fdPointId")));	
		map.put("fdAddress",StringUtils.toString(fdAddress, eiMetadata.getMeta("fdAddress")));	
		map.put("fdAlarmStatus",StringUtils.toString(fdAlarmStatus, eiMetadata.getMeta("fdAlarmStatus")));
		map.put("fdTypeId",StringUtils.toString(fdTypeId, eiMetadata.getMeta("fdTypeId")));
		map.put("fdTypeName",StringUtils.toString(fdTypeName, eiMetadata.getMeta("fdTypeName")));
		map.put("fdBeginTime",StringUtils.toString(fdBeginTime, eiMetadata.getMeta("fdBeginTime")));
		map.put("fdEndTime",StringUtils.toString(fdEndTime, eiMetadata.getMeta("fdEndTime")));
		map.put("fdMaxValue",StringUtils.toString(fdMaxValue, eiMetadata.getMeta("fdMaxValue")));
		map.put("fdMaxTime",StringUtils.toString(fdMaxTime, eiMetadata.getMeta("fdMaxTime")));
		map.put("fdMinValue",StringUtils.toString(fdMinValue, eiMetadata.getMeta("fdMinValue")));
		map.put("fdMinTime",StringUtils.toString(fdMinTime, eiMetadata.getMeta("fdMinTime")));
		map.put("fdAvgValue",StringUtils.toString(fdAvgValue, eiMetadata.getMeta("fdAvgValue")));
		map.put("fdTimestamp",StringUtils.toString(fdTimestamp, eiMetadata.getMeta("fdTimestamp")));
		
		return map;
	}

}
